import { IsNotEmpty, IsString, Length } from "class-validator";

export class SignonDto {
    @IsString({ message: 'username is not string' })
    @IsNotEmpty({ message: '用户名不能为空' })
    phone: string;

    @IsString({ message: 'password is not string' })
    @IsNotEmpty({ message: '密码不能为空' })
    password: string;

    @IsString({ message: 'captcha is not string' })
    @IsNotEmpty({ message: '验证码不能为空' })
    @Length(4, 4, { message: '验证码长度为4位' })
    captcha: string;
}